package cn.wen233.orderconsumer.infrustructure.fallback;

import cn.wen233.common.api.R;
import cn.wen233.domain.Order;
import cn.wen233.orderconsumer.infrustructure.feign.OrderFeign;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * 远程服务调用回退类
 *
 * @author wenei
 * @date 2021-06-05 16:57
 */
@Component
public class OrderFeignFallback implements OrderFeign {

    @Override
    public R<Order> getOrder(String id) {
        return R.success(Order.builder().address("假的").description("回退类回退出来的数据").build());
    }
}
